package com.woniu.register.service.impl;

import com.woniu.register.dto.NoticeDTO;
import com.woniu.register.entity.NoticeLogin;
import com.woniu.register.mapper.CheckMapper;
import com.woniu.register.mapper.NoticeLoginMapper;
import com.woniu.register.mapper.ProposerMapper;
import com.woniu.register.service.NoticeLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author ：zhulongxing
 * @date ：Created in 2022/12/6 10:12
 * @description：
 * @modified By：
 * @version: $
 */
@Service
public class NoticeLoginServiceImpl implements NoticeLoginService {
    @Autowired
    NoticeLoginMapper noticeLoginMapper;
    @Autowired
    ProposerMapper proposerMapper;
    @Autowired
    CheckMapper checkMapper;
    public int deleteByPrimaryKey(Long id) {
        return 0;
    }

    public int insert(NoticeLogin record) {
        return 0;
    }

    @Transactional
    public int insertSelective(NoticeDTO record) {
        checkMapper.insertSelectiveTwo(record);
        proposerMapper.insertSelectiveTwo(record);
       return noticeLoginMapper.insertSelective(record);
    }

    public NoticeLogin selectByPrimaryKey(Long id) {
        return null;
    }

    public int updateByPrimaryKeySelective(NoticeLogin record) {
        return noticeLoginMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(NoticeLogin record) {
        return 0;
    }

}
